﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

namespace OpenPhotoAlbum
{
	/// <summary>
	/// Summary description for $codebehindclassname$
	/// </summary>
	[WebService(Namespace = "http://tempuri.org/")]
	[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
	public class r : IHttpHandler
	{
		public void ProcessRequest(HttpContext context)
		{
			string userName = UrlContext.UserName;
			if (string.IsNullOrEmpty(userName)) { return; }

			DbAccess.User user = BusinessLogics.UserManager.Instance.GetUser(userName);
			if (user == null) { return; }

			string url = UrlContext.BuildSharedHomeUrl(user.UserId);
			context.Response.Redirect(url);
		}

		public bool IsReusable
		{
			get
			{
				return false;
			}
		}
	}
}
